import datetime
from typing import List
from pydantic import BaseModel, Field

from forward.modules.permission import permission


class RouteInSchema(BaseModel):
    update_time: datetime.datetime | None = Field(description="更新时间")
    path: str | None = Field(description="路径")
    summary: str | None = Field(description="摘要")
    tags: str | None = Field(description="标签")
    methods: str | None = Field(description="权限")
    endpoint: str | None = Field(description="端点函数")
    permission: str | None = Field(description="权限")
    description: str | None = Field(description="描述")

    


class RouteOutSchema(BaseModel):
    id: int = Field(description="自增ID")
    update_time: datetime.datetime | None = Field(description="更新时间")
    path: str | None = Field(description="路径")
    summary: str | None = Field(description="摘要")
    tags: str | None = Field(description="标签")
    methods: str | None = Field(description="权限")
    endpoint: str | None = Field(description="端点函数")
    permission: str | None = Field(description="权限")
    description: str | None = Field(description="描述")
